package util;

public interface IEventCallback
{
	final public static String CALLBACK_TYPE_CLIENT = "client";
	final public static String CALLBACK_TYPE_SERVER = "server";
	
	// Client event
	final public static long EVT_CLIENT_SEND_FILE_START = 0x0100;
	final public static long EVT_CLIENT_SEND_FILE_COMPLETE = 0x0101;
	final public static long EVT_CLIENT_SEND_FILE_PROGRESS = 0x0102;
	final public static long EVT_CLIENT_SEND_FILE_PAUSE = 0x0103;
	final public static long EVT_CLIENT_SEND_FILE_RESUME = 0x0104;
	final public static long EVT_CLIENT_SEND_FILE_STOP = 0x0105;
	final public static long EVT_CLIENT_CONN_START = 0x106;
	final public static long EVT_CLIENT_CONN_CLOSE = 0x107;
	final public static long EVT_CLIENT_CONN_CLOSE_READY = 0x108;
	final public static long EVT_CLIENT_TARGET_FILE_SIZE = 0x109;
	final public static long EVT_CLIENT_TARGET_FILE_RESUME = 0x110;
		
	// Server Event
	final public static long EVT_SERVER_RECV_FILE_START = 0x0200;
	final public static long EVT_SERVER_RECV_FILE_COMPLETE = 0x0201;
	final public static long EVT_SERVER_RECV_FILE_PROGRESS = 0x0202;
	final public static long EVT_SERVER_CONN_START = 0x203;
	final public static long EVT_SERVER_CONN_CLOSE = 0x204;
	
	// Error Event
	final public static long ERR_EXCEPTION = 0x1000;
	final public static long ERR_SOCKET_EXCEPTION = 0x1001;
	final public static long ERR_IO_EXCEPTION = 0x1002;
	final public static long ERR_INTERRUPTED_EXCEPTION = 0x1003;
	final public static long ERR_UNKNOWN_HOST_EXCEPTION = 0x1004;
	final public static long ERR_CONNECT_EXCEPTION = 0x1005;
	
	public void callback(long... args) throws Exception;
	
}